//
//  JKExt_GCD.swift
//  Fanrengame
//
//  Created by 朱凯 on 2018/3/31.
//  Copyright © 2018年 JooKey. All rights reserved.
//

import Foundation
import UIKit



// MARK: ------
extension DispatchQueue {
    
    private static var _onceTracker = [String]()
    
    static func once(token: String, block: ()->()) {
        
        synchronized(self) {
            if _onceTracker.contains(token) {
                return
            }
            _onceTracker.append(token)
            block()
        }
    }
}
